<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bai 2.7</title>
</head>

<body>
<?php
	if(isset($_POST["gio"]))
	{
		$gio=$_POST["gio"];	
		if($gio<13)
			$cauChao="Chào buổi sáng!";
		elseif($gio<19)
						$cauChao="Chào buổi chiều!";
		else
						$cauChao="Chào buổi tối!";
	}
?>
<form id="form1" name="form1" method="post" action="Bai2_7.php">
  <table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr bgcolor="#FF3300">
      <td colspan="2" bgcolor="#0099FF" style="text-align: center; font-weight: bold;"><span style="text-align: center"></span>CHÀO THEO GIỜ</td>
    </tr>
    <tr>
      <td bgcolor="#009999">Nhập giờ::</td>
      <td bgcolor="#009999"><input name="gio" type="text" id="gio" value="<?php echo $gio; ?>" /></td>
    </tr>
    <tr style="text-align: center">
      <td colspan="2" bgcolor="#009999"><label><?php echo $cauChao;?></label>&nbsp;</td>
    </tr>
    <tr bgcolor="#3784BF">
      <td colspan="2" bgcolor="#0099FF" style="text-align: center"><input type="submit" name="submit" id="submit" value="Chào" /></td>
    </tr>
  </table>
</form>
</body>
</html>